﻿@{
    Layout = null;
}
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
<title></title> 
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
     <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["pageIndex"] = s.pageIndex;
            e.customArgs["pageCount"] = s.pageCount;
            e.customArgs["pageRowSize"] = s.pageRowSize;
            e.customArgs["pageRowCount"] = s.pageRowCount;
            e.customArgs["FStatus"] = $("#hidFStatus").val();
            e.customArgs["NSRBMQ"] = $("#hidNSRBMQ").val();
            e.customArgs["FAllowanceClassNo"] = $("#hidFAllowanceClassNo").val();
        }

        function TaxAuditFormEdit(codeNo) {
            window.location.href = rootPath + '/TaxAuditPolicyAudit/TaxAuditPolicyAuditEdit?taxAuditId=' + codeNo;
        }

        function TaxAuditFormDel(codeNo) {

            $.ajax({
                type: 'POST',
                url: rootPath + '/TaxAuditPolicyAudit/IsReturn',
                data: { taxAuditId: codeNo },
                success: function (result) {
                    if (result == "ok") {
                        var rs = window.showModalDialog(rootPath + "/ReturnDlg?tableName=t_TaxAuditForm&id=" + codeNo + "&feq=30");

                        if (rs == "S") {
                            gvEditing.Refresh();
                        }
                    }
                    else {
                        alert("该企业已加入到期号无法退回!");
                    }
                }
            });
        }


        function search() {
            $("#hidFAllowanceClassNo").val(FAllowanceClassNo.GetValue());
            $("#hidNSRBMQ").val(NSRBMQ.GetText());
            $("#hidFStatus").val(FStatus.GetValue());
            gvEditing.Refresh();
        }

        //重置
        function undo() {
            ASPxClientTextBox.Cast("NSRBMQ").SetText("");

            ASPxClientTextBox.Cast("FAllowanceClassNo").SetValue("");

            ASPxClientTextBox.Cast("FStatus").SetValue("");


        }
        //        function MenuTop_emClick(source, e) {
        //            switch (e.item.name) {
        //                case "btnAdd":
        //                    {
        //                        //增加
        //                        window.location.href = rootPath + '/TaxAuditForm/TaxAuditFormAdd';
        //                        break;
        //                    }
        //            }
        //        }

        
    </script>
</head>
<body>
 @*       @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnAdd";
           item.Text = "增加";
           item.Image.Url = Url.Content("~/Content/ControlImages/edit_add.png");
           
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnDelete";
           item.Text = "删除";
           item.Image.Url = Url.Content("~/Content/ControlImages/button_delete.png");

       });

       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()*@
        <table align="center" class="tableForm">
        <tr>
            <td style=" text-align:right; vertical-align:middle"  class="tdClass">
               状态:</td>
            <td style="text-align:left; vertical-align:middle"  class="tdClass">
           @Html.DevExpress().ComboBox(settings =>
      {
          settings.Name = "FStatus";
          settings.Width = 100;
          settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
          settings.Properties.TextField = "Text";
          settings.Properties.ValueField = "Value";
      }).BindList(new List<SelectListItem> { 
                           new SelectListItem { Text = "未审核", Value = "2" }, 
                           new SelectListItem { Text = "已审核", Value = "3" }
     }).GetHtml()
            </td>
         <td style="text-align:right; vertical-align:middle"  class="tdClass">
                纳税人编码:</td>
            <td   class="tdClass">
      @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRBMQ";
          settings.Width  = 200;
          
      }).GetHtml()
            </td>
              <td align="right" class="tdClass">
     补贴方式:
    </td>
     <td class="tdClass">
      @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FAllowanceClassNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = 100;
                   settings.Properties.TextField = "FAllowanceName";
                   settings.Properties.ValueField = "FAllowanceClassNo";
               }).BindList(ViewData["AllowanceClassList"]).GetHtml()
    </td>
            <td>
             @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnSearch";
                settings.Text = "查询";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                settings.ClientSideEvents.Click = "search";
            }).GetHtml()
                   @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnUndo";
                settings.Text = "重置";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                settings.ClientSideEvents.Click = "undo";
            }).GetHtml()
            </td>
        </tr>
    </table>
        @Html.Partial("TaxAuditPolicyAuditListPartial", Model)
        @Html.Hidden("hidFStatus", "")
        @Html.Hidden("hidNSRBMQ", "")
        @Html.Hidden("hidFAllowanceClassNo", "")
    <script>
        lp.Hide();
    </script>
</body>
</html>
